#!/bin/sh
HOST=211.137.82.164
USER=dnsftp
PASS=Iacd_290
target_dir=/oracle/dnsftp/dns_data
local_dir=/usr/local/zlope/conf/stat_log
bak_dir=/usr/local/zlope/conf/stat_bak
mkdir -p $bak_dir
echo “Starting to sftp…”
mv  $local_dir/*.gz $bak_dir/
lftp -u ${USER},${PASS} sftp://${HOST} <<EOF
lcd $bak_dir
cd $target_dir
mput *.gz
bye
EOF
cd $bak_dir
rm -rf *.gz
echo “done”
